package classes.Site;

import db.Jdbc;
/**
 * @Auther: 程嘉明
 * @Date: 2018/8/22/022 11:11
 * @Description:建筑工地类
 * 创建一个建筑工地类的对象时完成对建筑工地表的增加
 */
public class ConstructionSite {
    private String ID;
    private String GDBS;//工地标识
    private String GDMC;//工地名称
    private String GDDZ;//工地地址
    private String HTBH;//合同编号
    private String SGXKZBH;//施工许可证编号

    public ConstructionSite(String ID,String GDBS,String GDMC,String GDDZ,String HTBH,String SGXKZBH) throws Exception {
        Jdbc.getConnection();
        String sql="insert into t_gdsbxx values ('"+ID+"','"+GDBS+"','"+GDMC+"','"+GDDZ+"','"+HTBH+"','"+SGXKZBH+"');";
        Jdbc.stat.executeUpdate(sql);
        // String sql="insert into t_gdsbxx values('"+ID+"','"+GDBS+"','"+GDMC+"','"+GDDZ+"','"+HTBH+"','"+SGXKZBH+"') ";
        // String sql="delete from t_gdsbxx where ID='"+id+"'";
        // String sql="update t_gdsbxx set ID='"+ID+"',GDBS='"+GDBS+"',GDMC='"+GDMC+"',GDDZ='"+GDDZ+"',HTBH='"+HTBH+"',SGXKZBH='"+SGXKZBH+"'";
    }

    public static void main(String[] args) throws Exception {
        new ConstructionSite("T000003",	"CCT65","常春藤65栋","安徽黄山","HT0002","LT00002" );
    }
}
